# 序列类型（列表）示例
print("="*30)
print("序列类型（列表）示例：")
student_info = ["小明", 18, "男", 85.5]
print("原始列表：", student_info)
print("访问姓名：", student_info[0])
student_info[3] = 90  # 修改成绩
print("修改后成绩：", student_info[3])
print("切片结果（前3项）：", student_info[:3])

# 分隔线
print("\n" + "-"*50 + "\n")

# 集合类型示例
print("集合类型示例：")
set1 = {1, 2, 3, 4, 5}
set2 = {4, 5, 6, 7, 8}
list_with_duplicates = [1, 2, 2, 3, 3, 3]
unique_set = set(list_with_duplicates)
print("列表去重后：", unique_set)
print("两集合交集：", set1 & set2)
print("两集合并集：", set1 | set2)

# 分隔线
print("\n" + "-"*50 + "\n")

# 映射类型（字典）示例
print("映射类型（字典）示例：")
student_dict = {
    "name": "小红",
    "age": 17,
    "scores": {"数学": 95, "语文": 92}
}
print("学生姓名：", student_dict["name"])
print("语文成绩：", student_dict["scores"]["语文"])
student_dict["class"] = "三年级一班"  # 添加班级信息
print("完整信息：")
for key, value in student_dict.items():
    print(f"  {key}: {value}")

print("\n" + "="*30)